/**
 * 2025/01/01 - 2025/12/31
 */
package com.snail.server.database.engine.ddl.operation;

import com.snail.server.database.engine.ddl.model.field.FieldAdd;
import com.snail.server.database.engine.ddl.model.field.FieldAlter;
import com.snail.server.database.engine.ddl.model.field.FieldDrop;
import com.snail.server.database.engine.ddl.model.index.IndexAdd;
import com.snail.server.database.engine.ddl.model.index.IndexAlter;
import com.snail.server.database.engine.ddl.model.index.IndexDrop;
import com.snail.server.database.engine.ddl.model.table.TableAlter;
import com.snail.server.database.engine.ddl.model.table.TableCreate;
import com.snail.server.database.engine.ddl.model.table.TableQuery;
import com.snail.server.database.engine.datasource.enums.DataSourceTypeEnum;

/**
 *
 * @author zgadmin
 * @date 2025/8/29 14:56
 *
 */
public interface IDDLOperation {

    boolean support(DataSourceTypeEnum datasourceType);

    boolean createTable(Long datasourceId, TableCreate tableCreate);

    boolean alterTable(Long datasourceId, TableAlter tableAlter);

    boolean dropTable(Long datasourceId, String tableName);

    boolean queryTable(Long datasourceId, TableQuery tableQuery);

    boolean addField(Long datasourceId, FieldAdd fieldAdd);

    boolean alterField(Long datasourceId, FieldAlter fieldAlter);

    boolean dropField(Long datasourceId, FieldDrop fieldDrop);

    boolean addIndex(Long datasourceId, IndexAdd indexAdd);

    boolean alterIndex(Long datasourceId, IndexAlter indexAlter);

    boolean dropIndex(Long datasourceId, IndexDrop indexDrop);

}